dic={f"key{i}":i for i in range(0,100)}
print(dic)

# 加if过滤条件
dic={f"key{i}":i for i in range(0,100) if i%2==1}
print(dic)
# 结合三目运算符
dic={f"key{i}":i if i%2==0 else "错误" for i in range(0,100)}
print(dic)
# 推导式的双层for循环
a="f=8&rsv_bp=1&srcqid=6056052417311533177&tn=48021271_36_hao_pg"
dict3={i for item in a.split("&") for i in item.split("=")}
print(dict3)
# 键值调换位置
dic4={"张三丰":"厉害","小龙女":"漂亮"}
dict5={value:key for key,value in dic4.items()}
print(dict5)

dict6=[f"{a}={b}" for a,b in dic4.items()]
print(dict6)

# 元组拆包
k,v,f=(3,4,5)
print(k)